<?php

class Admin_Form_Newbuoy extends Zend_Form {

    public function init() {
        parent::init();
        $this->initFields();
    }

    public function initFields() {
        $elements = array();
        
        $name = new Zend_Form_Element_Text("name");
        $name->setRequired();
        $elements[] = $name;
        
        $port = new Zend_Form_Element_Multiselect("port");
        $port_db = new Core_Model_DbTable_Ports();
        $port->setMultiOptions($port_db->getMultiOptions())
             ->setRequired();
        $elements[] = $port;
        
        $this->addElements($elements);
    }

}

?>
